home *** CD-ROM | disk | FTP | other *** search
- /* TrackInsert.c */
- /*
- * Copyright © 1989 Martin Minow. All rights reserved.
- *
- * TrackInsert(text, length, track_handle)
- * Ptr text;
- * LONGINT length;
- * TrackHandle track_handle;
- *
- * Insert the specified text just before the selection
- * range. Do not change either the selection range or
- * the Track private scrap.
- */
- #include "TrackEdit.h"
- #define TR (*tr)
-
- void
- TrackInsert(text, length, track_handle)
- Ptr text;
- LONGINT length;
- TrackHandle track_handle;
- {
- register TrackPtr tr;
- _Track_state state;
- DOT start;
-
- tr = _Track_lock(track_handle, &state);
- start = TR.selStart;
- _Track_do_insert(tr, TR.selStart, text, length);
- TR.selStart += length;
- TR.selEnd += length;
- _Track_rebuild(track_handle, start);
- _Track_unlock(&state);
- }
-